#include <stdio.h>
void main()
{
long int a;
for(a=1001;a<=30000;a+=2){
    printf("ld:",a);
    printf("( %ld*%ld-1)/8",a,a);
    printf("= %ld",(a*a-1)/8);
    printf("+ %ld\n",(a*a-1)%8);
}

}